package com.qyl.homeworkone;

import com.qyl.mainclass.Graphics;

public class Rectangle extends Graphics {

    //调用父类有参构造器
    public Rectangle(double lg,double wide,double high,double radious){
        super(lg,wide,high,radious);
    }

    //调用父类无参构造器
    public Rectangle(){
        super();
    }

    //调用父类绘图方法
    public void drawing2(){
        super.drawing();
    }

    //计算矩形面积
    public void area(){
        double b = getLg() * getWide();
        System.out.println("矩形的面积是：" + b);
    }
}
